package com.organ.base.util;

import org.jasypt.util.text.BasicTextEncryptor;

public class Jasypt {
	
	public static String encrypt(String value) throws Exception {
		BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
        //加密所需的salt(盐)
        textEncryptor.setPassword(CommonConstants.BUCKET_NAME);
        //要加密的数据（数据库的用户名或密码）
		return textEncryptor.encrypt(value);
	}
}
